<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		<input type="number" id="year" placeholder="请输入年......" />
		<button id = "btn">查询闰年还是平年</button>
	</body>
</html>
<script type="text/javascript">
	var Btn = document.getElementById('btn');
	Btn.onclick = function(){
		
		var Year = document.getElementById('year');
		var num = Year.value;
		((num%4==0&&num%100!=0)||num%400==0)?alert("是闰年!"):alert("是平年!");
	}

	
	
	
	
	
	
	
	
	
	
	
	
	
</script>